//
//  YCLoginUser.h
//  YCSchool
//
//  Created by gmall on 16/5/20.
//  Copyright © 2016年 yanglinxia. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <MJExtension/MJExtension.h>


typedef NS_ENUM(NSInteger,YCLoginUserType)
{
    /// 学员
    YCLoginUserTypeStudent = 1,
    /// 教练
    YCLoginUserTypeCoach = 2,
};

typedef NS_ENUM(NSInteger,YCUserSex)
{
    /// 未设置
    YCUserSexNoSetting = 0,
    /// 男
    YCUserSexBoy = 1,
    /// 女
    YCUserSexGril = 2,
};

typedef NS_ENUM(NSInteger,YCUserMarriageStatus)
{
    /// 未设置
    YCUserMarriageStatusNoSetting = 0,
    /// 单身-未婚
    YCUserMarriageStatusSingle = 1,
    /// 已婚
    YCUserMarriageStatusMarried = 2,
};

#pragma mark - 个人信息属性

@interface YCLoginUser : NSObject

/***************** 注册时用到的 ****************/
/** 用户id  */
@property (nonatomic, assign) NSInteger userId;
/** token  */
@property (nonatomic, strong) NSString *userToken;
/** 昵称  */
@property (nonatomic, strong) NSString *userNickname;

/** 头像  */
@property (nonatomic, strong) NSString *userAvatar;
/** 生日  */
@property (nonatomic, strong) NSString *userBirthday;
/** 背景图片  */
@property (nonatomic, strong) NSString *userBgimg;
/** 省  */
@property (nonatomic, strong) NSString *userProvince;
/** 市  */
@property (nonatomic, strong) NSString *userCity;
/** 区  */
@property (nonatomic, strong) NSString *userDistrict;
/** 手机号  */
@property (nonatomic, strong) NSString *userMobilPhone;
/***************** 额外添加 ****************/

/** 用户类型 */
@property (nonatomic, assign) YCLoginUserType userType;
/** 星座 */
@property (nonatomic, strong) NSString *userHoroscope;
/** 婚姻状况  */
@property (nonatomic, assign) YCUserMarriageStatus userMarriageStatus;
/** 婚姻状态字符串 */
@property (nonatomic,readonly) NSString *userMarriageStatusString;
/** 性别 */
@property (nonatomic) YCUserSex userSex;
/** 性别字符串 */
@property (nonatomic,readonly) NSString *userSexString;

#pragma mark - 

///登录用户对应的主目录
@property (nonatomic,readonly) NSString *homeDirectory;
///登录用户数据库文件路径
@property (nonatomic,readonly) NSString *dbFilePath;


/** 是否不同版本 */
@property (nonatomic, assign) BOOL isUpdateVersion;
/** 是否登录 */
@property (nonatomic) BOOL is_login;
/** 判断是否有网络 */
@property (nonatomic, assign) BOOL isNetworking;
/** 判断网络是否变化 */
@property (nonatomic ,assign) BOOL isChange_netWork;

/**
 *  单例
 */
//+ (instancetype)shareLoginUser;


/**
 *  根据用户名读取出注册时的用户对象
 */
+ (instancetype)loginUserWithName:(NSString *)userNickName;

/**
 *  根据用户信息登录
 */
+ (void)loginWithUser:(YCLoginUser *)user;

/**
 *  退出登录
 */
- (void)loginOut;

/**
 *  更新
 */
//- (void)update;

@end
